﻿@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer Localizer
@model Kdy.AuthCenter.STS.Identity.ViewModels.Consent.ScopeViewModel

<li class="list-group-item">
	<div class="toggle-button__input">
		<toggle-button>
			<input class="consent-scopecheck"
				   type="checkbox"
				   name="ScopesConsented"
				   id="scopes_@Model.Value"
				   value="@Model.Value"
				   checked="@Model.Checked"
				   disabled="@Model.Required" />
		</toggle-button>
	</div>
	<div class="toggle-button__text">
		@if (Model.Required)
		{
			<input type="hidden"
				   name="ScopesConsented"
				   value="@Model.Value" />
		}
		<strong>@Model.DisplayName</strong>
		@if (Model.Emphasize)
		{
			<i class="fa fa-exclamation-circle"></i>
		}
	</div>
	@if (Model.Required)
	{
		<div class="toggle-button__text">
			<span><em>@Localizer["Required"]</em></span>
		</div>
	}
	@if (Model.Description != null)
	{
		<div class="consent-description">
			<label for="scopes_@Model.Value">@Model.Description</label>
		</div>
	}
</li>







